Integrand size = 43, antiderivative size = 207 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^{5/2} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a^{5/2} (25 A+38 B+40 C) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{8 d}+\frac {a^3 (49 A+54 B-24 C) \sin (c+d x)}{24 d \sqrt {a+a \sec (c+d x)}}-\frac {a^2 (3 A+2 B-8 C) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{4 d}+\frac {a (5 A+6 B) \cos (c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{12 d}+\frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{3 d} \]
[Out]
Time = 0.80 (sec) , antiderivative size = 207, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.140, Rules used = {4171, 4102, 4103, 4100, 3859, 209} \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^{5/2} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a^{5/2} (25 A+38 B+40 C) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{8 d}+\frac {a^3 (49 A+54 B-24 C) \sin (c+d x)}{24 d \sqrt {a \sec (c+d x)+a}}-\frac {a^2 (3 A+2 B-8 C) \sin (c+d x) \sqrt {a \sec (c+d x)+a}}{4 d}+\frac {a (5 A+6 B) \sin (c+d x) \cos (c+d x) (a \sec (c+d x)+a)^{3/2}}{12 d}+\frac {A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^{5/2}}{3 d} \]
[In]
[Out]
Rule 209
Rule 3859
Rule 4100
Rule 4102
Rule 4103
Rule 4171
Rubi steps \begin{align*} \text {integral}& = \frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{3 d}+\frac {\int \cos ^2(c+d x) (a+a \sec (c+d x))^{5/2} \left (\frac {1}{2} a (5 A+6 B)-\frac {1}{2} a (A-6 C) \sec (c+d x)\right ) \, dx}{3 a} \\ & = \frac {a (5 A+6 B) \cos (c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{12 d}+\frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{3 d}+\frac {\int \cos (c+d x) (a+a \sec (c+d x))^{3/2} \left (\frac {1}{4} a^2 (31 A+42 B+24 C)-\frac {3}{4} a^2 (3 A+2 B-8 C) \sec (c+d x)\right ) \, dx}{6 a} \\ & = -\frac {a^2 (3 A+2 B-8 C) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{4 d}+\frac {a (5 A+6 B) \cos (c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{12 d}+\frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{3 d}+\frac {\int \cos (c+d x) \sqrt {a+a \sec (c+d x)} \left (\frac {1}{8} a^3 (49 A+54 B-24 C)+\frac {1}{8} a^3 (13 A+30 B+72 C) \sec (c+d x)\right ) \, dx}{3 a} \\ & = \frac {a^3 (49 A+54 B-24 C) \sin (c+d x)}{24 d \sqrt {a+a \sec (c+d x)}}-\frac {a^2 (3 A+2 B-8 C) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{4 d}+\frac {a (5 A+6 B) \cos (c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{12 d}+\frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{3 d}+\frac {1}{16} \left (a^2 (25 A+38 B+40 C)\right ) \int \sqrt {a+a \sec (c+d x)} \, dx \\ & = \frac {a^3 (49 A+54 B-24 C) \sin (c+d x)}{24 d \sqrt {a+a \sec (c+d x)}}-\frac {a^2 (3 A+2 B-8 C) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{4 d}+\frac {a (5 A+6 B) \cos (c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{12 d}+\frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{3 d}-\frac {\left (a^3 (25 A+38 B+40 C)\right ) \text {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{8 d} \\ & = \frac {a^{5/2} (25 A+38 B+40 C) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{8 d}+\frac {a^3 (49 A+54 B-24 C) \sin (c+d x)}{24 d \sqrt {a+a \sec (c+d x)}}-\frac {a^2 (3 A+2 B-8 C) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{4 d}+\frac {a (5 A+6 B) \cos (c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{12 d}+\frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{3 d} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 1.73 (sec) , antiderivative size = 374, normalized size of antiderivative = 1.81 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^{5/2} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a^2 \left (165 A \text {arctanh}\left (\sqrt {1-\sec (c+d x)}\right )+126 B \text {arctanh}\left (\sqrt {1-\sec (c+d x)}\right )+360 C \text {arctanh}\left (\sqrt {1-\sec (c+d x)}\right )+31 A \sqrt {1-\sec (c+d x)}-54 B \sqrt {1-\sec (c+d x)}+144 C \sqrt {1-\sec (c+d x)}+159 A \cos (c+d x) \sqrt {1-\sec (c+d x)}-18 B \cos (c+d x) \sqrt {1-\sec (c+d x)}+72 C \cos (c+d x) \sqrt {1-\sec (c+d x)}+31 A \cos (2 (c+d x)) \sqrt {1-\sec (c+d x)}-54 B \cos (2 (c+d x)) \sqrt {1-\sec (c+d x)}-2 A \cos (3 (c+d x)) \sqrt {1-\sec (c+d x)}+576 B \operatorname {Hypergeometric2F1}\left (\frac {1}{2},3,\frac {3}{2},1-\sec (c+d x)\right ) \sqrt {1-\sec (c+d x)}+192 A \operatorname {Hypergeometric2F1}\left (\frac {1}{2},4,\frac {3}{2},1-\sec (c+d x)\right ) \sqrt {1-\sec (c+d x)}\right ) \sqrt {a (1+\sec (c+d x))} \sin (c+d x)}{72 d (1+\cos (c+d x)) \sqrt {1-\sec (c+d x)}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(520\) vs. \(2(183)=366\).
Time = 199.22 (sec) , antiderivative size = 521, normalized size of antiderivative = 2.52
method | result | size |
default | \(\frac {a^{2} \left (8 A \cos \left (d x +c \right )^{3} \sin \left (d x +c \right )+75 A \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {arctanh}\left (\frac {\sin \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}}\right ) \cos \left (d x +c \right )+34 A \cos \left (d x +c \right )^{2} \sin \left (d x +c \right )+114 B \,\operatorname {arctanh}\left (\frac {\sin \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}}\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \cos \left (d x +c \right )+12 B \sin \left (d x +c \right ) \cos \left (d x +c \right )^{2}+120 C \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {arctanh}\left (\frac {\sin \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}}\right ) \cos \left (d x +c \right )+75 A \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {arctanh}\left (\frac {\sin \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}}\right )+75 A \cos \left (d x +c \right ) \sin \left (d x +c \right )+114 B \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {arctanh}\left (\frac {\sin \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}}\right )+66 B \cos \left (d x +c \right ) \sin \left (d x +c \right )+120 C \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {arctanh}\left (\frac {\sin \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}}\right )+24 C \cos \left (d x +c \right ) \sin \left (d x +c \right )+48 C \sin \left (d x +c \right )\right ) \sqrt {a \left (1+\sec \left (d x +c \right )\right )}}{24 d \left (\cos \left (d x +c \right )+1\right )}\) | \(521\) |
[In]
[Out]
none
Time = 0.36 (sec) , antiderivative size = 410, normalized size of antiderivative = 1.98 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^{5/2} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\left [\frac {3 \, {\left ({\left (25 \, A + 38 \, B + 40 \, C\right )} a^{2} \cos \left (d x + c\right ) + {\left (25 \, A + 38 \, B + 40 \, C\right )} a^{2}\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right ) + 2 \, {\left (8 \, A a^{2} \cos \left (d x + c\right )^{3} + 2 \, {\left (17 \, A + 6 \, B\right )} a^{2} \cos \left (d x + c\right )^{2} + 3 \, {\left (25 \, A + 22 \, B + 8 \, C\right )} a^{2} \cos \left (d x + c\right ) + 48 \, C a^{2}\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{48 \, {\left (d \cos \left (d x + c\right ) + d\right )}}, -\frac {3 \, {\left ({\left (25 \, A + 38 \, B + 40 \, C\right )} a^{2} \cos \left (d x + c\right ) + {\left (25 \, A + 38 \, B + 40 \, C\right )} a^{2}\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) - {\left (8 \, A a^{2} \cos \left (d x + c\right )^{3} + 2 \, {\left (17 \, A + 6 \, B\right )} a^{2} \cos \left (d x + c\right )^{2} + 3 \, {\left (25 \, A + 22 \, B + 8 \, C\right )} a^{2} \cos \left (d x + c\right ) + 48 \, C a^{2}\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{24 \, {\left (d \cos \left (d x + c\right ) + d\right )}}\right ] \]
[In]
[Out]
Timed out. \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^{5/2} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Timed out} \]
[In]
[Out]
Timed out. \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^{5/2} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^{5/2} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )}^{\frac {5}{2}} \cos \left (d x + c\right )^{3} \,d x } \]
[In]
[Out]
Timed out. \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^{5/2} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int {\cos \left (c+d\,x\right )}^3\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{5/2}\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right ) \,d x \]
[In]
[Out]